package com.yb.bussiness.announcement;

import java.util.Date;
import java.util.Map;

import com.yb.domain.goods.TgAnnouncement;

public interface AnnouncementService {

	/**
	 * 保存或修改公告
	 * 
	 * @param TgAnnouncement
	 */
	public void saveOrUpdate(TgAnnouncement tgAnnouncement);

	/**
	 * 根据条件查询公告
	 * 
	 * @return Map<String,Object>
	 */
	public Map<String, Object> findAll(TgAnnouncement formBean, String page,
			String row);

	/**
	 * 查询公告
	 * 
	 * @param id
	 * @return TmBaseinfo
	 */
	public TgAnnouncement read(Long id);

	/**
	 * 批量删除公告
	 * 
	 * @param idString
	 * @return
	 */
	public boolean deleteByIdString(String idString);

	/**
	 * 根据类型查询
	 */
	public TgAnnouncement findTgByType(String type);
	
	/**
	 * 论坛公告
	 */
	public TgAnnouncement findTribuneByType(String type);

	/**
	 * 根据类型id查找相应公告
	 * 
	 * @param categoryId
	 * @return
	 */
	public TgAnnouncement findByCategory(Long categoryId, String type);
	
	/**
	 * 查找某个时间段是否有新注册的业主、商家，新的申请记录以及新的参加记录
	 */
	public Integer findNewInfo(String nowTime);
}
